10/01/2002
5:45 PM

 

PreviousNext
 
   
Frankentosh: Building Robots using Mac OS X
 
   
  • Mindstorms -- NQC Programming
    • A robotics version of "Hello World"
      • Well, since "Hello World" isn't really convenient or simple for robots, let's try a "move forward" program
      • This program turns on the motors and set the robot moving forward
      // this program assumes that your 
      // motors are attached to "A" and "C"
      // OUT_A is the macro for port "A" 
      // on an RCX, OUT_C is port "C"
      
      task main {
           while(true) {
                OnFwd(OUT_A + OUT_C);
           }
      }
      
    • Very simple robot that's an infinte loop
 
   
Ted Stevko, Stevko Studios http://www.plasticnoodle.com